#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
int factorial(int num)
{   
	if (num!=1)
	{
		return num = num * factorial(num - 1);
	}
	else
		return 1;
}
int main()
{
	int n = 0;
	scanf("%d", &n);
	printf("%d", factorial(n));
	return 0;
}
